<script setup>
  import {ref} from "vue";

  const rq=ref('')

  const times=ref([])
  const f=()=>{
    console.log(times.value)
  }
</script>

<template>
<h1>EL-日期时间选择器组件</h1>
  <el-date-picker
      type="date"
      format="YYYY-MM-DD"
      v-model="rq"
      value-format="YYYY-MM-DD"
      @change="console.log(rq)"
  ></el-date-picker>

  <el-date-picker
      type="datetimerange"
      format="YYYY-MM-DD HH:mm:ss"
      v-model="times"
      value-format="YYYY-MM-DD HH:mm:ss"
      @change="f"
  ></el-date-picker>
</template>

<style scoped>

</style>